
<%--
  Created by IntelliJ IDEA.
  User: soufiane
  Date: 18/04/11
  Time: 21:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<link rel="stylesheet" type="text/css" href="<s:url value="/styles.css"/>" media="all" />

		<title>portail etudiant admin</title>

	</head>

	<body>

		<div class="banner_accueil"><img src="<s:url value="/images/univ_mlv.png"/>" alt="universite marne la vallee"></div>

	<div class="menu">
		<div class="cadre">
			<ul>
                <li><a href="<s:url action='formationAdmin'/>">Formations</a></li>
				<li><a href="<s:url action='courseAdmin'/>">Cours</a></li>
				<li><a href="<s:url action='optionCourseAdmin'/>">Cours optionels</a></li>
				<li><a href="<s:url action='studentAdmin'/>">Etudiants</a></li>
                <li><a href="<s:url action='professorAdmin'/>">Professeurs</a></li>

			</ul>
		</div>
	</div>
<br/>
		<div class="table" align="center">
        <h2>La liste des cours </h2>
     <%--<s:if test="%{tdList.size()>0}">    --%>
        <table border="1" align="center">
            <tr>

             <th>Nom</th>
             <th colspan=4>Actions</th>


            </tr>
            <s:if test="%{displayCourse.size()>0}" >
            <s:iterator value="displayCourse" >
                <tr>

                    <td>
                      <s:property value="name"/>
                    </td>






					<td> <s:url action="editCourseAdmin" var="urlTag" >
                               <s:param name="name"><s:property value="%{dispFormation.name}"/> </s:param>
                               <s:param name="nameCourse"><s:property value="name"/> </s:param>
                               <s:param name="idCourse"><s:property value="%{displayCourse.id}"/> </s:param>
                            </s:url>
                           <a href="<s:property value="#urlTag" />" >Modifier</a>
                    </td>

                    <td>
                         <s:url action="removeCourseAdmin" var="urlTag" >
                               <s:param name="name"><s:property value="name"/> </s:param>
                            </s:url>
                           <a href="<s:property value="#urlTag" />" >Supprimer</a>
                    </td>

                </tr>
             </s:iterator>
                 <p class ="bienvenue">
                     <s:url action="addCourse" var="url">
                          <s:param name="name"><s:property value="%{dispFormation.name}"/> </s:param>  </s:url>
                     <a href="<s:property value="#url"/>">ajouter un cours</a>
                 </p>
             </s:if>
            <s:else>
                <p class ="bienvenue">
                     <s:url action="addCourse" var="url">
                          <s:param name="name"><s:property value="%{dispFormation.name}"/> </s:param>  </s:url>
                    <a href="<s:property value="#url"/>">ajouter un cours</a>
                </p>
            </s:else>
        </table>
        <br/><br/>


    <%--</s:if>--%>
      </div>



    </body>
</html>